{% load static %}
<html lang="en">
<head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <!-- 上述meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <!-- Bootstrap CSS -->
    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
    <link href="{% static 'login/css/index.css' %}" rel="stylesheet"/>
    <title>首页</title>
</head>
<body>
<div class="container">
    <div class="col">
        <form action="/index/" method="post" enctype="multipart/form-data" class="form-index">
            <h1>{{ request.session.user_name }}! 欢迎回来  </h1>
            {% if message_index %}
            <div class="alert alert-warning">
                {{ message_index }}
            </div>
            {% endif %}
            {% csrf_token %}

            <div class="form-group">
                {{ image_form.as_p}}
            </div>
            <input type="submit" value="上传" class="btn btn-primary">
        </form>
    </div>
</div>

<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->

{# 以下三者的引用顺序是固定的#}
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script src="https://cdn.bootcss.com/popper.js/1.15.0/umd/popper.js"></script>
<script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>
</body>
</html>